import request from '@/utils/request'

// 查询告警规则—场景联动列表
export function listScene(query) {
  return request({
    url: '/biz/scene/list',
    method: 'get',
    params: query
  })
}

// 查询告警规则—场景联动详细
export function getScene(id) {
  return request({
    url: '/biz/scene/' + id,
    method: 'get'
  })
}

// 新增告警规则—场景联动
export function addScene(data) {
  return request({
    url: '/biz/scene',
    method: 'post',
    data: data
  })
}

// 修改告警规则—场景联动
export function updateScene(data) {
  return request({
    url: '/biz/scene',
    method: 'put',
    data: data
  })
}

// 删除告警规则—场景联动
export function delScene(id) {
  return request({
    url: '/biz/scene/' + id,
    method: 'delete'
  })
}

// 触发告警规则—场景联动
export function handleTrigger(id) {
  return request({
    url: '/biz/scene/handleTrigger/' + id,
    method: 'get'
  })
}

// 导出告警规则—场景联动
export function exportScene(query) {
  return request({
    url: '/biz/scene/export',
    method: 'get',
    params: query
  })
}

export function editAlarmSceneAll(data){
  return request({
    url: '/biz/scene/editAlarmSceneAll',
    method: 'put',
    data: data
  })
}

// 查询告警规则—场景联动详细
export function selectAlarmSceneList(id) {
  return request({
    url: '/biz/scene/selectAlarmSceneList/' + id,
    method: 'get'
  })
}

export function updateRunStatus(data){
  return request({
    url: '/biz/scene/updateRunStatus',
    method: 'post',
    data: data
  })
}

